package cn.tx.service.Impl;

import cn.tx.dao.AchievementDao;
import cn.tx.model.Achievement;
import cn.tx.model.Grade;
import cn.tx.service.AchievementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class AchievementServicelmpl implements AchievementService {

    @Autowired
    AchievementDao achievementDao;
    @Override
    public List<Achievement> findAll(){
        return achievementDao.findAll();
    }

    @Override
    public  int addAchievement(Achievement achievement){
        return achievementDao.addAchievement(achievement);
    }

    @Override
    public int UpdateAchievementById(Achievement achievement){
        return achievementDao.UpdateAchievementById(achievement);
    }


    @Override
    public int delete(String ids){
        return achievementDao.delete(ids);
    }

    @Override
    public List<Achievement> findList(Map<String,Object> querymap){
        return achievementDao.findList(querymap);
    }

    @Override
    public int findTotal(Map<String,Object>querymap){
        return achievementDao.findTotal(querymap);
    }

    @Override
    public Achievement findByUserName(String username) {
        return achievementDao.findByUserName(username);
    }
}
